<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>



        function getRandom(max, min) {
            var ran = Math.floor(Math.random() * (max - min + 1) + min);
            return ran
        };
        correct = getRandom(1, 100);
        status = true;
        while(status) {
            guess = parseInt(prompt('输入的数字'));
            if(correct == guess) {
                alert('你猜对啦！');
                status_1 = parseInt(prompt('输入的数字选择\n1.再玩一次\n2.退出'));
                if(status_1 = '2'){
                    status = false;
                    break;
                }else{
                    status =true
                }
            }else if(correct < guess) {
                alert('你猜大了！');
            }else if(correct > guess) {
                alert('你猜小了！');
            }
        };
        
    </script>
</head>
<body>
    
</body>
</html>